// components/top-bar/index.js
const app = getApp()
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    backgroundUrl: {
      type: String,
      value: ""
    },
    title: {
      type: String,
      value: "歌单"
    },
    backgroundShow: {
      type: Boolean,
      value: true
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
    topBarHeight: 0,
  },
  lifetimes: {
    attached: function() {
      this.setData({ topBarHeight: app.globalData.statusBarHeight })
    }
  },
  /**
   * 组件的方法列表
   */
  methods: {
    handleBack() {
      wx.navigateBack()
    }
  }
})
